<template>
  <div class="px-4 flex gap-2 w-full gap-2 create-scheduled justify-center items-center">
    <div class="inner relative">
      <div class="frame-bg">
        <div class="frame-body flex flex-col h-full">
          <div class="main-content flex-1">
            <div class="flex justify-between mb-4">
              <div>{{ t["定时任务"] }}</div>
              <a-button status="danger" @click="onClose">
                <icon-close></icon-close>
              </a-button>
            </div>
            <component :is="currentStep.component"></component>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { currentStep } from "../step";

const t = translate("公共模块");
const emit = defineEmits(["onClose"]);

const onClose = () => {
  emit("onClose");
};
</script>

<style lang="scss" scoped>
.create-scheduled {
  width: 100%;
  height: 100vh;
  background-color: #02020277;
  position: fixed;
  top: 0;
  z-index: 100;
  left: 0;

  .inner {
    width: 60%;
    min-width: 1000px;
    height: 96%;
    background-color: white;
    overflow-y: auto;
  }
}

.frame-bg {
  padding: 16px;
  height: 100%;
}

.main-content {
  text-align: center;
  height: 100%;
}

.close {
  top: 0;
  right: 0;
}
</style>
